package com.yuntai.pms.model.enums;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author songhc@yuntai.com
 * @create 2019-01-14 9:59
 * @desc 数字对应的枚举类型
 **/
public enum SupportStatus {

    support(1,"支持"),
    noSupport(0,"不支持");

    private Integer code;
    private String name;

    private static Map<Integer,String> supportMap = new LinkedHashMap<>();

    static {
        supportMap.put(support.getCode(),support.getName());
        supportMap.put(noSupport.getCode(),noSupport.getName());
    }

    private SupportStatus(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static Map<Integer, String> getSupportMap() { return supportMap; }

    public static void setSupportMap(Map<Integer, String> supportMap) { SupportStatus.supportMap = supportMap; }
}
